cmake_minimum_required(VERSION 3.27)
project(log4cpp)

set(CMAKE_CXX_STANDARD 11)
# 设置log4cpp路径
set(LOG4CPP_INCLUDE_DIR /usr/include/log4cpp)

# 包含log4cpp头文件路径
include_directories(${LOG4CPP_INCLUDE_DIR})

add_executable(log4cpp main.cpp)

# 连接log4cpp库
target_link_libraries(log4cpp liblog4cpp.so)

# 添加链接线程
target_link_libraries(log4cpp libpthread.so)


